"""
利用Python进行数据分析

读写文本格式的数据

pandas
"""
import numpy as np
from pandas import Series, DataFrame
import pandas as pd
import csv


def read_test_01():
    """
    手工处理分隔符格式
    :return:
    """
    # f = open('ex7.csv')
    # reader = csv.reader(f)
    # # print(reader)
    # for line in reader:
    #     print(line)

    lines = list(csv.reader(open('ex7.csv')))
    # print(lines)
    header, values = lines[0], lines[1:]
    # print(header)
    # print(values)
    data_dict = {h: v for h, v in zip(header, zip(*values))}
    print(data_dict)


def main():
    read_test_01()


if __name__ == '__main__':
    main()
